
// 引入axios工具
const axios = require("axios")
// 项目中公共的js
module.exports={
get:function(s){
return document.querySelector(s)
},
// 调取ajax的方法
ajax:axios.create({
    baseURL: 'http://47.96.154.185:3701',
    headers: { 'authorization': 'Bearer ' + localStorage.getItem("token") }
}),
// 页面底部
tabbar:function(s,name){
this.get(s).innerHTML=`  <ul>
<li>
    <a href="index.html" class="${name==='index'?'zv':''}">
        <span class="iconfont icon-house"></span>
        <p>首页</p>
    </a>
</li>
<li>
    <a href="" class="${name==='sport'?'zv':''}">
        <span class="iconfont icon-gangling"></span>
        <p>运动</p>
    </a>
</li>
<li>
    <a href="" class="${name==='circle'?'zv':''}">
        <span class="iconfont icon-beijingyinle"></span>
        <p>圈子</p>
    </a>
</li>
<li>
    <a href="" class="${name==='mine'?'zv':''}">
        <span class="iconfont icon-wode"></span>
        <p>我的</p>
    </a>
</li>

</ul>
`
}

}